Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate unsafe default options of JSON.load #644

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

casperisfine
Copy link

@casperisfine casperisfine commented Oct 24, 2024

Ref: https://bugs.ruby-lang.org/issues/19528

load is understood as the default method for serializer kind of libraries, and the default options of JSON.load has caused many security vulnerabilities over the years.

The plan is to do like YAML/Psych, deprecate these default options and direct users toward using JSON.unsafe_load so at least it's obvious it shouldn't be used against untrusted data.

[Feature #19528]

Ref: https://bugs.ruby-lang.org/issues/19528

`load` is understood as the default method for serializer kind of libraries, and
the default options of `JSON.load` has caused many security vulnerabilities over the
years.

The plan is to do like YAML/Psych, deprecate these default options and direct
users toward using `JSON.unsafe_load` so at least it's obvious it should be
used against untrusted data.
@byroot byroot merged commit 94c7e13 into ruby:master Oct 30, 2024
36 checks passed
@casperisfine casperisfine deleted the deprecate-unsafe-load branch October 30, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants